package com.xf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xf.common.core.entity.dmp.DmpCert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author JoeyLiu
 * @create 2022-03-29 14:57
 */
@Mapper
public interface DmpCertMapper extends BaseMapper<DmpCert> {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String id);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    DmpCert selectByPrimaryKey(String id);



    /**
     * 批量更新
     *
     * @param list
     * @return
     */
    Boolean updateBatchSelective(List<DmpCert> list);


    /**
     * 批量新增或者修改
     * @param list
     * @return
     */

    Boolean batchInsertOrUpdate(@Param("list") List<DmpCert> list);



    /**
     * 选择性新增或修改
     *
     * @param record
     * @return
     */
    Boolean insertOrUpdateSelective(DmpCert record);


    <T> IPage<DmpCert> findUserDetailPage(Page<T> page, @Param("cert") DmpCert cert);





}